Skip to content

[RF][RS] Store fit results in the AsymptoticCalculator - #23107

Open
guitargeek wants to merge 1 commit into
root-project:masterfrom
guitargeek:roostats-asymptotic-fit-results
Open

[RF][RS] Store fit results in the AsymptoticCalculator#23107
guitargeek wants to merge 1 commit into
root-project:masterfrom
guitargeek:roostats-asymptotic-fit-results

Conversation

@guitargeek

Copy link
Copy Markdown
Contributor

The AsymptoticCalculator performed all its fits in a local helper that saved a RooFitResult only to read off the minimum NLL value and then discarded it. Users therefore had no way to check programmatically whether the underlying fits actually converged, even though the calculator happily reports a significance also when they did not.

Keep the RooFitResult objects of the four fits (unconditional and conditional, on observed and Asimov data) as members of the calculator and expose them with the new getters GetFitResultUncondObs(), GetFitResultCondObs(), GetFitResultUncondAsimov() and GetFitResultCondAsimov(). The results are now saved also when the minimization failed, so that the minimizer status and EDM of a non-converged fit can be inspected. The stored unconditional results are updated when GetHypoTest() finds a better minimum in its refit fallback.

Also document in the class description that the fits can already be steered via the ROOT::Math::MinimizerOptions defaults for strategy and tolerance, which was the second request in the ticket.

Closes JIRA ROOT-10066.

🤖 Done with the help of AI

@guitargeek guitargeek self-assigned this Aug 19, 2026
@guitargeek
guitargeek requested a review from bellenot as a code owner August 19, 2026 11:49
@guitargeek
guitargeek requested a review from hageboeck as a code owner August 19, 2026 11:49
@guitargeek guitargeek changed the title [RooStats] Store fit results in the AsymptoticCalculator [RF][RS] Store fit results in the AsymptoticCalculator Aug 19, 2026
The AsymptoticCalculator performed all its fits in a local helper that
saved a RooFitResult only to read off the minimum NLL value and then
discarded it. Users therefore had no way to check programmatically
whether the underlying fits actually converged, even though the
calculator happily reports a significance also when they did not.

Keep the RooFitResult objects of the four fits (unconditional and
conditional, on observed and Asimov data) as members of the calculator
and expose them with the new getters GetFitResultUncondObs(),
GetFitResultCondObs(), GetFitResultUncondAsimov() and
GetFitResultCondAsimov(). The results are now saved also when the
minimization failed, so that the minimizer status and EDM of a
non-converged fit can be inspected. The stored unconditional results are
updated when GetHypoTest() finds a better minimum in its refit fallback.

Also document in the class description that the fits can already be
steered via the ROOT::Math::MinimizerOptions defaults for strategy and
tolerance, which was the second request in the ticket.

Closes JIRA [ROOT-10066](https://its.cern.ch/jira/browse/ROOT-10066).

🤖 Done with the help of AI
@guitargeek
guitargeek force-pushed the roostats-asymptotic-fit-results branch from 89be29b to 66a3875 Compare August 19, 2026 12:05
@github-actions

Copy link
Copy Markdown

Test Results

    23 files      23 suites   3d 19h 8m 5s ⏱️
 3 860 tests  3 858 ✅ 0 💤 2 ❌
78 638 runs  78 634 ✅ 1 💤 3 ❌

For more details on these failures, see this check.

Results for commit 66a3875.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant